package com.ithema.arithmeticoperator;

public class ArithmeticOperatorDemo6 {
    //主入口
    public static void main(String[] args) {
        int x = 10;

        int y = x++;//先用后加，先把 x 赋值给 y，x 在 +1

        int z = ++x;//先加后用，先 x+1再把 x 的值给 z;
        System.out.println("x:" + x);//12
        System.out.println("y:" + y);//10
        System.out.println("z:" + z);//12
    }
}
